<template>
  <div>
    <div id="main">

    </div>
  </div>
</template>

<script>
import * as echarts from 'echarts';
import option from './js/option'
import { echartsGet } from '../../api/user'
export default {
  async mounted() {
    var chartDom = document.getElementById('main')
    var myChart = echarts.init(chartDom)
    let res = await echartsGet()
    console.log(res)
    let { data } = res.data.results[0]
    option.series[0].data = data
    myChart.setOption(option);
  }

}
// var option;


// }
</script>

<style lang="scss" scoped>
#main {
  // background-color: pink;
  height: 600px;
  // width: 500px;
}
</style>